/*******************************************************************
File Name:     apHiResElapsedTime.h
Author:        Shawn.Zhang
Security:      SEACHANGE SHANGHAI
Description:   Implement class apScreenShotBase
			   Function Inventory: 
Modification Log:
When           Version        Who				What
---------------------------------------------------------------------
2007/06/10		1.0			  Shawn.Zhang		Create
********************************************************************/

#ifndef _WIN32_FASTTIMING_H_
#define _WIN32_FASTTIMING_H_


#ifndef LONGLONG
typedef __int64 LONGLONG;
#endif

/// apHiResElapsedTime High-resolution Simple elapsed time class.

class apHiResElapsedTime
{
public:
	// Record the current time
	apHiResElapsedTime ();

	// Return elapsed time, in microseconds.
	double usec () const;

	// Return elapsed time, in milliseconds.
	double msec () const;

	// Return elapsed time, in seconds
	double sec () const;

	// Reset the current time
	void reset ();

private:
	// Starting time
	LONGLONG starting_;     
};

class apResElapsedTime
{
public:
	// Record the current time
	apResElapsedTime ();

	// Return elapsed time, in microseconds.
	double usec () const;

	// Return elapsed time, in milliseconds.
	double msec () const;

	// Return elapsed time, in seconds
	double sec () const;

	// Reset the current time
	void reset ();

private:
	// Starting time
	LONGLONG starting_;     
};

#endif  // _WIN32_FASTTIMING_H_
